package com.shlh.saas.controller;

import com.shlh.saas.common.Result;
import com.shlh.saas.entity.CustomerService;
import com.shlh.saas.service.CustomerServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客服信息控制器
 */
@RestController
@RequestMapping("/customer-service")
public class CustomerServiceController {

    @Autowired
    private CustomerServiceService customerServiceService;

    /**
     * 获取客服信息
     * @return 客服信息
     */
    @GetMapping("/info")
    public Result<CustomerService> getCustomerServiceInfo() {
        CustomerService customerService = customerServiceService.getCustomerServiceInfo();
        if (customerService != null) {
            return Result.success(customerService);
        } else {
            return Result.error("未找到客服信息");
        }
    }
} 